<div class="bjui-pageContent">
    <form action="/admin/order/orderConfirmAssignment" id="assignment_order" data-toggle="ajaxform" data-alertmsg="true">
    <input type="hidden" name="order_id" value="{{$orderId}}">
    <div class="bjui-row col-2">
        @foreach ($result as $row)
            <div class="bjui-row col-2">
                <label class="row-label" style="width:200px;">{{$row['title']}}</label>
                <label class="row-label">
                <select name="processid_{{$row['process_id']}}">
                        <option value=''>请选择</option>
                    @foreach($row['distributionUser'] as $userRow)
                        <option value='{{$userRow['user_id']}}' >{{$userRow['truename']}}</option>
                    @endforeach
                </select>
                </label>
            </div>
        @endforeach
    </div>
    </form>
</div>

<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-default" data-icon="save" onclick="createOrderSubmit();">保存</button></li>
        <li><button type="button" class="btn-close" data-icon="close">取消</button></li>
    </ul>
</div>

<script type="text/javascript">
    function createOrderSubmit() {
        BJUI.ajax('ajaxform', {
            url: '/admin/order/orderConfirmAssignment',
            form: $.CurrentDialog.find('#assignment_order'),
            validate: false,
            loadingmask: true,
            callback: function (json) {
                if(json.code  == 0){
                    BJUI.dialog('close','order-assignment-dialog');
                    //打开订单列表页
                    BJUI.navtab({
                        id: 'order-list',
                        url: '/admin/order/getOrderList',
                        title: '订单列表'
                    })
                }else{
                    BJUI.alertmsg('info', json.message);
                }
            }
        });
    }

</script>
